<?php
/**
 * @package quizzes
 * @author Andrew Meredith <andymeredith@gmail.com>
 */
namespace PhpQuizzes;

/**
 * A quiz question
 * This class represents a single question that belongs to a single quiz
 */
class Question {
	/** @property int $_id The unique identifier of this question object in the database */
	private $_id;
	
	/** @property string $_prompt The "prompt" for this question */
	private $_prompt;
	
	public function getId() {
		return $this->_id;
	}
	public function setId( $id ) {
		if (is_int( $id )) {
			$this->_id = $id;
		} else {
			throw new InvalidArgumentException("Invalid ID supplied. Expected an integer, but got '$id'");
		}
	}
	
	public function getPrompt() {
		return $this->_prompt;
	}
	public function setPrompt( $prompt ) {
		$this->_prompt = $prompt;
	}
}